<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册租户</title>
<link rel="stylesheet" href="../webjars/bootstrap/3.3.7-1/css/bootstrap.css" />
<link rel="stylesheet" href="../static/jquery-easyui-1.5.5.3/themes/material-teal/easyui.css" />
<link rel="stylesheet" href="../static/jquery-easyui-1.5.5.3/themes/icon.css" />
<script src="../static/jquery-easyui-1.5.5.3/jquery.min.js"></script>
<script src="../static/jquery-easyui-1.5.5.3/jquery.easyui.min.js"></script>
<script src="../static/jquery-easyui-1.5.5.3/locale/easyui-lang-zh_CN.js"></script>

	<script type="text/javascript">
		$(function(){
			$('#btn1').click(function(){
				if($('#myform').form('validate')){
					$.ajax({
						type:'post',
						url:'savezh',
						cache:false,
						data:$('#myform').serialize(),
						success:function(data){
							$.messager.show({
								title: '提示信息',
								msg: '操作成功！'
							});
						}
					});
				}else{
					$.messager.show({
						title: '提示信息',
						msg: '数据验证不通过，不能保存'
					});
				}
			});
	});	
	</script>
<style type="text/css">
	#form{
		width: 50%;
		text-align: right;
		margin-top: 20px; 	
	}
</style>
</head>
<body>
	<div id="form">
		<form action="" method="post" id="myform">
			<input type="hidden" name="id" value="">
			<p><label>租户名称：</label><input type = "text" name = "name"  class="easyui-validatebox" required=true missingMessage="租户名称必填!" ></p>
			<p><label>联系人：</label><input type = "text" name = "linkman"  class="easyui-validatebox" required=true missingMessage="联系人必填!" ></p>
			<p><label>电话：</label><input type = "text" name = "phone"  class="easyui-validatebox" required=true missingMessage="电话必填!" ></p>
			<label>分配管理员：</label>
			<select name="lesseeAdmin_id" style="width:26%;">
						<option  th:each="z:${all}" th:value="${z.id}" th:text="${z.name }"></option>
					</select><br>
			<input id = "btn1" value="注册" class="easyui-linkbutton">
		</form>
	</div>
	<div>
		<p style="margin-top: 20px;"><center>当您注册了租户了之后，可以在所有租户信息看到您刚才新增的租户！</center></p>
	</div>
		
</body>
</html>